<?php
/*
 *author:Yangligao
 *Date:2013-9-28
 */
require '../../Config.php';
$flag = $_GET['flag'];

$flinkModel = new FlinkModel();
if($flag == 'display'){
	$flink_id = $_GET['id'];
	$res = $flinkModel->flink_select("*","where flink_id={$flink_id}");
	$smarty->assign('flinkeachData',$res[0]);
	$smarty->display('Admin/FlinkM/flinkupdate.html');	
}else if($flag == 'flinkupdate'){
	unset($_POST['x']);
	unset($_POST['y']);
	$res = $flinkModel->flink_update($_POST);
	if($res){
		jump('操作成功！', $_SERVER['HTTP_REFERER']);
	}else{
		alertInfo('操作失败！', $_SERVER['HTTP_REFERER']);
	}
}
?>
